Skip to content

Let DI framework create MonitorService instances #1165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Jul 11, 2022

Motivation

Let the dependency injection framework create the service instances. This PR is a dev thing only and the follow-up of #1162.

Change description

  • Reduced the visibility of the coreClientProvider field to private,
  • Inject MonitorServiceFactoryOptions into the MonitorService instances,
  • Removed coreClientProvider field from the MonitorServiceFactoryOptions. The DI will take care of injecting props from superclasses.

Other information

The monitor functionality must be the same as on the main. The PR is a dev-only thing; expect no behavioral changes.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@kittaakos kittaakos requested review from AlbyIanna and per1234 July 11, 2022 07:16
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jul 11, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serial Monitor is still working fine for me with the build from this PR.

Thanks for the follow up code enhancement work Akos!

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code's fine with me.
Thanks for this reafctoring 🧹

@kittaakos kittaakos merged commit 7fed8fe into main Jul 12, 2022
@kittaakos kittaakos deleted the monitor-service-injection branch July 12, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants